Optimal. Leaf size=106 \[ \frac {8 \sqrt [4]{-1} a^3 \tanh ^{-1}\left ((-1)^{3/4} \sqrt {\cot (c+d x)}\right )}{d}-\frac {8 a^3}{5 d \cot ^{\frac {3}{2}}(c+d x)}+\frac {8 i a^3}{d \sqrt {\cot (c+d x)}}-\frac {2 \left (i a^3+a^3 \cot (c+d x)\right )}{5 d \cot ^{\frac {5}{2}}(c+d x)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.16, antiderivative size = 106, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 6, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.231, Rules used = {3754, 3634,
3672, 3610, 3614, 214} \begin {gather*} -\frac {8 a^3}{5 d \cot ^{\frac {3}{2}}(c+d x)}-\frac {2 \left (a^3 \cot (c+d x)+i a^3\right )}{5 d \cot ^{\frac {5}{2}}(c+d x)}+\frac {8 i a^3}{d \sqrt {\cot (c+d x)}}+\frac {8 \sqrt [4]{-1} a^3 \tanh ^{-1}\left ((-1)^{3/4} \sqrt {\cot (c+d x)}\right )}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 214
Rule 3610
Rule 3614
Rule 3634
Rule 3672
Rule 3754
Rubi steps
\begin {align*} \int \frac {(a+i a \tan (c+d x))^3}{\sqrt {\cot (c+d x)}} \, dx &=\int \frac {(i a+a \cot (c+d x))^3}{\cot ^{\frac {7}{2}}(c+d x)} \, dx\\ &=-\frac {2 \left (i a^3+a^3 \cot (c+d x)\right )}{5 d \cot ^{\frac {5}{2}}(c+d x)}-\frac {2}{5} \int \frac {(i a+a \cot (c+d x)) \left (-6 i a^2-4 a^2 \cot (c+d x)\right )}{\cot ^{\frac {5}{2}}(c+d x)} \, dx\\ &=-\frac {8 a^3}{5 d \cot ^{\frac {3}{2}}(c+d x)}-\frac {2 \left (i a^3+a^3 \cot (c+d x)\right )}{5 d \cot ^{\frac {5}{2}}(c+d x)}-\frac {2}{5} \int \frac {-10 i a^3-10 a^3 \cot (c+d x)}{\cot ^{\frac {3}{2}}(c+d x)} \, dx\\ &=-\frac {8 a^3}{5 d \cot ^{\frac {3}{2}}(c+d x)}+\frac {8 i a^3}{d \sqrt {\cot (c+d x)}}-\frac {2 \left (i a^3+a^3 \cot (c+d x)\right )}{5 d \cot ^{\frac {5}{2}}(c+d x)}-\frac {2}{5} \int \frac {-10 a^3+10 i a^3 \cot (c+d x)}{\sqrt {\cot (c+d x)}} \, dx\\ &=-\frac {8 a^3}{5 d \cot ^{\frac {3}{2}}(c+d x)}+\frac {8 i a^3}{d \sqrt {\cot (c+d x)}}-\frac {2 \left (i a^3+a^3 \cot (c+d x)\right )}{5 d \cot ^{\frac {5}{2}}(c+d x)}-\frac {\left (80 a^6\right ) \text {Subst}\left (\int \frac {1}{10 a^3+10 i a^3 x^2} \, dx,x,\sqrt {\cot (c+d x)}\right )}{d}\\ &=\frac {8 \sqrt [4]{-1} a^3 \tanh ^{-1}\left ((-1)^{3/4} \sqrt {\cot (c+d x)}\right )}{d}-\frac {8 a^3}{5 d \cot ^{\frac {3}{2}}(c+d x)}+\frac {8 i a^3}{d \sqrt {\cot (c+d x)}}-\frac {2 \left (i a^3+a^3 \cot (c+d x)\right )}{5 d \cot ^{\frac {5}{2}}(c+d x)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 2.53, size = 164, normalized size = 1.55 \begin {gather*} \frac {a^3 e^{-3 i c} \sqrt {\cot (c+d x)} (\cos (3 (c+d x))+i \sin (3 (c+d x))) \left (\sec ^3(c+d x) (-5 \cos (c+d x)+5 \cos (3 (c+d x))+17 i \sin (c+d x)+21 i \sin (3 (c+d x)))-80 \tanh ^{-1}\left (\sqrt {\frac {-1+e^{2 i (c+d x)}}{1+e^{2 i (c+d x)}}}\right ) \sqrt {i \tan (c+d x)}\right )}{10 d (\cos (d x)+i \sin (d x))^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 4 vs. order
3.
time = 29.32, size = 520, normalized size = 4.91
method | result | size |
default | \(\frac {a^{3} \left (-1+\cos \left (d x +c \right )\right ) \left (20 i \sin \left (d x +c \right ) \sqrt {\frac {-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}}\, \sqrt {\frac {\cos \left (d x +c \right )-1+\sin \left (d x +c \right )}{\sin \left (d x +c \right )}}\, \sqrt {-\frac {\cos \left (d x +c \right )-1-\sin \left (d x +c \right )}{\sin \left (d x +c \right )}}\, \left (\cos ^{2}\left (d x +c \right )\right ) \EllipticPi \left (\sqrt {-\frac {\cos \left (d x +c \right )-1-\sin \left (d x +c \right )}{\sin \left (d x +c \right )}}, \frac {1}{2}+\frac {i}{2}, \frac {\sqrt {2}}{2}\right )-20 i \EllipticF \left (\sqrt {-\frac {\cos \left (d x +c \right )-1-\sin \left (d x +c \right )}{\sin \left (d x +c \right )}}, \frac {\sqrt {2}}{2}\right ) \sqrt {\frac {-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}}\, \sqrt {\frac {\cos \left (d x +c \right )-1+\sin \left (d x +c \right )}{\sin \left (d x +c \right )}}\, \sqrt {-\frac {\cos \left (d x +c \right )-1-\sin \left (d x +c \right )}{\sin \left (d x +c \right )}}\, \left (\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )+20 \sin \left (d x +c \right ) \sqrt {\frac {-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}}\, \sqrt {\frac {\cos \left (d x +c \right )-1+\sin \left (d x +c \right )}{\sin \left (d x +c \right )}}\, \sqrt {-\frac {\cos \left (d x +c \right )-1-\sin \left (d x +c \right )}{\sin \left (d x +c \right )}}\, \left (\cos ^{2}\left (d x +c \right )\right ) \EllipticPi \left (\sqrt {-\frac {\cos \left (d x +c \right )-1-\sin \left (d x +c \right )}{\sin \left (d x +c \right )}}, \frac {1}{2}+\frac {i}{2}, \frac {\sqrt {2}}{2}\right )+21 i \sqrt {2}\, \left (\cos ^{3}\left (d x +c \right )\right )-21 i \sqrt {2}\, \left (\cos ^{2}\left (d x +c \right )\right )-5 \sqrt {2}\, \left (\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )-i \cos \left (d x +c \right ) \sqrt {2}+5 \sqrt {2}\, \cos \left (d x +c \right ) \sin \left (d x +c \right )+i \sqrt {2}\right ) \left (\cos \left (d x +c \right )+1\right )^{2} \sqrt {2}}{5 d \sqrt {\frac {\cos \left (d x +c \right )}{\sin \left (d x +c \right )}}\, \cos \left (d x +c \right )^{2} \sin \left (d x +c \right )^{4}}\) | \(520\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.50, size = 161, normalized size = 1.52 \begin {gather*} \frac {5 \, {\left (\left (2 i - 2\right ) \, \sqrt {2} \arctan \left (\frac {1}{2} \, \sqrt {2} {\left (\sqrt {2} + \frac {2}{\sqrt {\tan \left (d x + c\right )}}\right )}\right ) + \left (2 i - 2\right ) \, \sqrt {2} \arctan \left (-\frac {1}{2} \, \sqrt {2} {\left (\sqrt {2} - \frac {2}{\sqrt {\tan \left (d x + c\right )}}\right )}\right ) - \left (i + 1\right ) \, \sqrt {2} \log \left (\frac {\sqrt {2}}{\sqrt {\tan \left (d x + c\right )}} + \frac {1}{\tan \left (d x + c\right )} + 1\right ) + \left (i + 1\right ) \, \sqrt {2} \log \left (-\frac {\sqrt {2}}{\sqrt {\tan \left (d x + c\right )}} + \frac {1}{\tan \left (d x + c\right )} + 1\right )\right )} a^{3} - 2 \, {\left (i \, a^{3} + \frac {5 \, a^{3}}{\tan \left (d x + c\right )} - \frac {20 i \, a^{3}}{\tan \left (d x + c\right )^{2}}\right )} \tan \left (d x + c\right )^{\frac {5}{2}}}{5 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 390 vs. \(2 (86) = 172\).
time = 0.47, size = 390, normalized size = 3.68 \begin {gather*} -\frac {5 \, \sqrt {\frac {64 i \, a^{6}}{d^{2}}} {\left (d e^{\left (6 i \, d x + 6 i \, c\right )} + 3 \, d e^{\left (4 i \, d x + 4 i \, c\right )} + 3 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \log \left (\frac {{\left (8 i \, a^{3} e^{\left (2 i \, d x + 2 i \, c\right )} + \sqrt {\frac {64 i \, a^{6}}{d^{2}}} {\left (d e^{\left (2 i \, d x + 2 i \, c\right )} - d\right )} \sqrt {\frac {i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} - 1}}\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}}{4 \, a^{3}}\right ) - 5 \, \sqrt {\frac {64 i \, a^{6}}{d^{2}}} {\left (d e^{\left (6 i \, d x + 6 i \, c\right )} + 3 \, d e^{\left (4 i \, d x + 4 i \, c\right )} + 3 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \log \left (\frac {{\left (8 i \, a^{3} e^{\left (2 i \, d x + 2 i \, c\right )} - \sqrt {\frac {64 i \, a^{6}}{d^{2}}} {\left (d e^{\left (2 i \, d x + 2 i \, c\right )} - d\right )} \sqrt {\frac {i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} - 1}}\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}}{4 \, a^{3}}\right ) - 16 \, {\left (13 \, a^{3} e^{\left (6 i \, d x + 6 i \, c\right )} + 6 \, a^{3} e^{\left (4 i \, d x + 4 i \, c\right )} - 11 \, a^{3} e^{\left (2 i \, d x + 2 i \, c\right )} - 8 \, a^{3}\right )} \sqrt {\frac {i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} - 1}}}{20 \, {\left (d e^{\left (6 i \, d x + 6 i \, c\right )} + 3 \, d e^{\left (4 i \, d x + 4 i \, c\right )} + 3 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} - i a^{3} \left (\int \frac {i}{\sqrt {\cot {\left (c + d x \right )}}}\, dx + \int \left (- \frac {3 \tan {\left (c + d x \right )}}{\sqrt {\cot {\left (c + d x \right )}}}\right )\, dx + \int \frac {\tan ^{3}{\left (c + d x \right )}}{\sqrt {\cot {\left (c + d x \right )}}}\, dx + \int \left (- \frac {3 i \tan ^{2}{\left (c + d x \right )}}{\sqrt {\cot {\left (c + d x \right )}}}\right )\, dx\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\left (a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )}^3}{\sqrt {\mathrm {cot}\left (c+d\,x\right )}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________